package com.hp.service.impl;

import com.github.pagehelper.PageHelper;
import com.hp.entity.Dite;
import com.hp.mapper.DiteMapper;
import com.hp.service.DiteService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DiteServiceImp implements DiteService {
   @Autowired
   DiteMapper diteMapper;
    @Override
    public List<Dite> queryAll(Dite dite, Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return diteMapper.queryAll(dite);
    }

    @Override
    public int insert(Dite dite) {
        return diteMapper.insert(dite);
    }

    @Override
    public int del(Integer id) {
        return diteMapper.del(id);
    }

    @Override
    public Dite findId(Integer id) {
        return diteMapper.findId(id);
    }

    @Override
    public int update(Dite dite) {
        return diteMapper.update(dite);
    }
}
